<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>按键修饰符</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <input v-on:keyup.13="submit">
    </div>
</body>
<script>
    var vm = new Vue({
        el: '#app',
        // 在 'methods' 对象中定义方法
        methods: {
            submit: function(){
                alert('submit...')
            }
        }
    })
</script>
</html>